<?php

/**
 * Class Involved_ExperRecordModel
 */

class Involved_ExperRecordModel extends BaseModel
{

    protected $table = 'exper_record';


    /**
     * 体验标前一天用户id查询
     * @return mixed
     */
    public function ExperInvestSel()
    {
        return  DB::table($this->table)
            ->select('user_id')
            ->where('status','WAIT')
            ->whereBetween('exper_time',array(time()-86400,time()))
            ->get();
    }

    /**
     * 体验标成功盈利
     * @return mixed
     */
    public function MonthTiyan($user_id)
    {
        return  DB::table($this->table)
            ->select('return_money')
            ->where('user_id',$user_id)
            ->where('status','SUCCESS')
            ->first();
    }

}